package com.java.common.constant;

/**
 * Security常量
 * 
 * @author yilabao
 * @date 2021年1月27日
 */
public class SecurityConstants {

    /**
     * API接口路由
     */
    public static final String API_PATH_PATTERNS = "/api/**";

    /**
     * PC接口路由
     */
    public static final String PC_PATH_PATTERNS = "/pc/**";

    public static final String ADMIN_PATH_PATTERNS = "/admin/**";

    /**
     * 可匿名访问的资源
     */
    public static final String[] ANONYMOUS_ANY_ANT_PATTERNS = { "/admin/login", "/admin/captchaImage", "/profile/**",
            "/admin/common/download**", "/admin/common/download/resource**", "/doc.html", "/swagger-ui.html",
            "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/admin/druid/**", API_PATH_PATTERNS,
            PC_PATH_PATTERNS, "/admin/common/ueditor**", "/static/**", "/admin/common/systemName" };

    public static final String[] ANONYMOUS_GET_ANT_PATTERNS = { "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js" };

    /**
     * 退出登录地址
     */
    public static final String LOGOUT_URL = "/admin/logout";

    /**
     * 可匿名访问的资源（PC端）
     */
    public static final String[] PC_ANONYMOUS_ANY_ANT_PATTERNS = { ADMIN_PATH_PATTERNS, API_PATH_PATTERNS,
            "/profile/**", "/static/**", "/doc.html", "/swagger-ui.html", "/swagger-resources/**", "/webjars/**",
            "/*/api-docs", "/error" };

}